package eu.best.sercheng.examples;

import java.util.LinkedList;

import eu.best.sercheng.model.dao.MainDao;
import eu.best.sercheng.model.dao.MainDaoImpl;
import eu.best.sercheng.model.entity.DomainRules;
import eu.best.sercheng.model.entity.Rule;

public class TryDomainRules {
	public static void main(String[] args) {
		DomainRules domainRules1 = new DomainRules();
		domainRules1.setDomainName("www.dot.co");
		LinkedList<Rule> all = new LinkedList<Rule>();
		all.add(new Rule("/asd/ds"));
		all.add(new Rule("/asd/kkk"));
		all.add(new Rule("/asd/ppp"));
		
		LinkedList<Rule> dis = new LinkedList<Rule>();
		dis.add(new Rule("/asd/"));
		dis.add(new Rule("/as*"));
		dis.add(new Rule("/a/ppp"));
		
		domainRules1.setAllow(all);
		domainRules1.setDisallow(dis);
		
		MainDao dao = new MainDaoImpl();
		dao.persistDomainRules(domainRules1);
	}
}
